using System;

namespace T0075WaterAlert
{
    /// <summary>
    /// Monitor
    /// </summary>
    public class Monitor
    {
        public Monitor(Heater heater)
        {
            heater.temperatureEvent += ShowTemperature;//bind function to event
        }
        //Show temperature as number
        public void ShowTemperature(int temp)
        {
            Console.WriteLine("the Monitor shows that water temperature now is"+temp);
        }
    }
}